package org.dmd.wsdl.server.generated.dmw;

// Generated from: org.dmd.util.codegen.ImportManager.getFormattedImports(ImportManager.java:82)
// Called from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:442)
import org.dmd.dmc.*;                                             // If any attributes - (BaseDMWGenerator.java:1087)
import org.dmd.dmc.definitions.DmcDefinitionIF;                   // The object is a domain specific definition - (BaseDMWGenerator.java:411)
import org.dmd.dmc.types.DefinitionName;                          // Is named by - (BaseDMWGenerator.java:1062)
import org.dmd.dms.ClassDefinition;                               // Passing derived class def up the hierarchy - (BaseDMWGenerator.java:1067)
import org.dmd.dms.generated.dmo.MetaDMSAG;                       // Required for MODREC constructor - (BaseDMWGenerator.java:1072)
import org.dmd.dms.generated.types.DmcTypeModifierMV;             // Required for MODREC constructor - (BaseDMWGenerator.java:1071)
import org.dmd.wsdl.server.extended.WsdlDefinition;               // Derived class - (BaseDMWGenerator.java:1248)
import org.dmd.wsdl.server.extended.WsdlService;                  // Required for getModificationRecorder() - (BaseDMWGenerator.java:1076)
import org.dmd.wsdl.shared.generated.dmo.WsdlServiceDMO;          // Class not auxiliary or abstract - (BaseDMWGenerator.java:1252)
import org.dmd.wsdl.shared.generated.types.WsdlModuleREF;         // Required to access defined in module name - (DMWGenerator.java:180)



/**
 * A WsdlService specifies a single interface that the service will support,
 * and a list of\n endpoint locations where that service can be accessed.
 * Each endpoint must also reference a previously\n defined binding to
 * indicate what protocols and transmission formats are to be used at that
 * endpoint.\n A service is only permitted to have one interface.
 * <P>
 * Generated from the dmwsdl schema at version unknown
 * <P>
 * This code was auto-generated by the dmggenerator utility and shouldn't be alterred manually!
 * Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:479)
 */
abstract public class WsdlServiceDMW extends WsdlDefinition implements DmcDefinitionIF, DmcNamedObjectIF {

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:558)
    public WsdlServiceDMW() {
        super(new WsdlServiceDMO(), org.dmd.wsdl.server.generated.DmwsdlSchemaAG._WsdlService);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:564)
    public WsdlServiceDMW(DmcTypeModifierMV mods) {
        super(new WsdlServiceDMO(mods), org.dmd.wsdl.server.generated.DmwsdlSchemaAG._WsdlService);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:606)
    public WsdlService getModificationRecorder(){
        WsdlService rc = new WsdlService();
        rc.setName(getName());
        rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
        return(rc);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:627)
    public WsdlServiceDMW(WsdlServiceDMO obj) {
        super(obj, org.dmd.wsdl.server.generated.DmwsdlSchemaAG._WsdlService);
    }

    public WsdlService cloneIt() {
        WsdlService rc = new WsdlService();
        rc.setDmcObject(getDMO().cloneIt());
        return(rc);
    }

    public WsdlServiceDMO getDMO() {
        return((WsdlServiceDMO) core);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGenerator.dumpWrapper(BaseDMWGenerator.java:642)
    protected WsdlServiceDMW(WsdlServiceDMO obj, ClassDefinition cd) {
        super(obj,cd);
    }

    // org.dmd.dmg.generators.BaseDMWGenerator.getAccessFunctions(BaseDMWGenerator.java:1297)
    public DefinitionName getObjectName(){
        return(((WsdlServiceDMO) core).getName());
    }

    public int hashCode(){
        return(getObjectName().hashCode());
    }

    public DmcAttribute<?> getObjectNameAttribute(){
        return(((WsdlServiceDMO) core).getObjectNameAttribute());
    }

    public boolean equals(Object obj){
        if (obj instanceof WsdlServiceDMW){
            return( getObjectName().equals( ((WsdlServiceDMW) obj).getObjectName()) );
        }
        return(false);
    }

    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1474)
    public DefinitionName getName(){
        return(((WsdlServiceDMO) core).getName());
    }

    /**
     * Sets name to the specified value.
     * @param value A value compatible with DmcTypeDefinitionName
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1584)
    public void setName(Object value) throws DmcValueException {
        ((WsdlServiceDMO) core).setName(value);
    }

    /**
     * Sets name to the specified value.
     * @param value DefinitionName
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1593)
    public void setName(DefinitionName value){
        ((WsdlServiceDMO) core).setName(value);
    }

    /**
     * Removes the name attribute value.
     */
    // org.dmd.dmg.generators.BaseDMWGenerator.formatSV(BaseDMWGenerator.java:1619)
    public void remName(){
        ((WsdlServiceDMO) core).remName();
    }

    // Generated from: org.dmd.dmg.generators.DMWGenerator.dumpAdditionalWrapperFunctions(DMWGenerator.java:221)
    /**
     * This method indicates the name of the module from which this definition was loaded.
     */
    @Override
    public String getNameOfModuleWhereThisCameFrom(){
        WsdlModuleREF ref = ((WsdlServiceDMO) core).getDefinedInWsdlModule();
        return(ref.getName().getNameString());
    }


}
